<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
<script language="javascript" type="text/javascript" src="../jquery-1.8.1.js" ></script>
<script language="javascript" type="text/javascript">
$(document).ready(function(){

	$("#btn01").click(function(){
		alert($.getRandNum());
	});

	$("#btn02").click(function(){
		$("#linka").html("BBBB");
	});
	
	$("#btn03").click(function(){
		$("table tbody").empty();
		$( "<tr><td>test3</td><td>test4</td></tr>" ).appendTo("table tbody");
	});

});


	$.extend({getRandNum:function(){
			var myDate = new Date();
			var i = parseInt(Math.random() * (10000 - 0 + 1) + 0);
			var tstr = myDate.getFullYear().toString()+(myDate.getMonth()+1).toString()+myDate.getDate().toString()+i.toString();
			return tstr;
		}
	});



</script>
</head>

<body>
<input type="button" id="btn01" value="test" />
<a href="#" id="linka">AAAA</a>
<input type="button" id="btn02" value="testAStr" />
<input type="button" id="btn03" value="testTbody" />
<table>
<thead>
<tr><td>tittleA</td><td>tittleB</td></tr>
</thead>
<tbody>
<tr><td>test1</td><td>test2</td></tr>

</tbody>

</table>

</body>
</html>
